Ext.onReady(function(){
    Ext.BLANK_IMAGE_URL = '/bres/img/s.gif';	
	Ext.QuickTips.init();

    var ToolBar = {
        region: 'north',
        xtype: 'toolbar',
        height: 30,
        items: [
            {xtype: 'tbtext', text: '&nbsp;Имя пользователя: '+USER}, '-', '->','-',
            {text: 'Выход', handler: CloseWin, id: 'close-btn'}
        ]
    };

// ############################################################################################################# 
    var projectPanel = new ProjectTree();

    var MainPanel  = new Ext.Panel({
      region: 'center',
      margins:'3 3 3 3',
      cmargins:'3 3 3 3',
      border: false,
      layout: 'border',
      autoScroll: true,
      //html : '---'
      items: [ ToolBar, projectPanel ]
    });

    var VP = new Ext.Viewport({
      layout: 'border',
      items: [ MainPanel ]
    });

    VP.render('vp');

});